//方法一
// var agree = document.getElementById('agree');
// var registerBtn = document.getElementById('registerBtn');
// console.log(registerBtn);
// agree.onclick = function(){
//     registerBtn.disabled = !this.checked;
// }
//方法二
var agree = document.getElementById('agree');
var registerBtn = document.getElementById('registerBtn');
agree.onclick = function(){
 var isOk = this.checked;
 if(isOk){
  registerBtn.disabled = false;
 }else{
  registerBtn.disabled = true; 
 }
}